/*
 * Created on 15/06/2005
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package com.davinci.freemarket.businessLayer.utils.writer;

import java.io.*;
import java.util.zip.*;

public class FreeMarketDeflateWriter extends FreeMarketAbstractWriter{

	public FreeMarketDeflateWriter(String charset){
		super(charset);
	}

	public void prepare() throws IOException {
		
		byteOutPut = new ByteArrayOutputStream(20000);
		DeflaterOutputStream deflate = new DeflaterOutputStream(byteOutPut);
		OutputStreamWriter bridge = new OutputStreamWriter(deflate, charset);
		
		bridge.write(out.toString());
		bridge.flush();
		bridge.close();
		
		size = byteOutPut.size();
	}
	
}

